package com.mybatis_puls.demo.controller;


import com.mybatis_puls.demo.entity.Carousel;
import com.mybatis_puls.demo.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 小🌤
 * @since 2020-12-28
 */
@RestController
@RequestMapping("/carousel")
public class CarouselController {

      @Autowired
      private CarouselService carouselService;

      //查询全部
     @RequestMapping("/findAll")
    public Object findAll(){
        List<Carousel> list = carouselService.list();
     return  list;
     }
}

